package com.guangzhi.weijianzhi.adapter;

import java.util.ArrayList;

import com.guangzhi.weijianzhi.R;
import com.guangzhi.weijianzhi.company.center.CompileCompanyInfoActivity;
import com.guangzhi.weijianzhi.entity.BeansCity;
import com.guangzhi.weijianzhi.entity.BeansDistrict;
import com.guangzhi.weijianzhi.entity.BeansProvince;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class MyAddressadapterThree extends BaseAdapter {
	
	
	ArrayList<BeansDistrict> districts;
	private Context con;
	public MyAddressadapterThree(ArrayList<BeansDistrict> district,Context con){
		this.districts = district;
		this.con = con;
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub  
			return districts.size();
		
	}
	
	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		// TODO Auto-generated method stub
		
		
		TextView tv = new TextView(con);
		tv.setTextColor(con.getResources().getColor(R.color.black));
			tv.setPadding(0, 15, 0, 15);
			tv.setGravity(Gravity.CENTER);
			tv.setText(districts.get(arg0).getName());
			
		return tv;
	}
	
}
